<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <div class="h"><a href="{:U('add')}" class="btn btn-info"><i class="glyphicon glyphicon-plus"></i>新增用户</a>
      <form action="{:U('index')}" method="get" class="fr form-inline">
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" placeholder="输入搜索关键词" class="form-control" value="{$keywords}" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form></div>
     <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
 <tr>
    <td align="center">ID</td>
    <td align="center">店铺名</td>
    <td align="center">会员名</td>
    
    <td align="center">管理范围</td>
    <if condition="getAccessMenu($accessList, 'Admin', 'Supplier', 'index')">
    <td align="center">供货商权限</td>
    </if>
    <td align="center">密码</td>
    <td align="center">状态</td>
    <td align="center">最后登录时间</td>
    <td align="center">最后登录IP</td>  
   
    <td align="center">创建时间</td> 
    <td align="center">操作</td>
  </tr>
</thead>
<volist name="list" id="vo">
  <tr class="data_list">
    <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />{$vo.id}->{$vo.member_id}</td>
    <td style="text-indent:{$vo['cl']*10}px"><gt name="vo['cl']" value="0">|-</gt>      {$vo.susername}</td>
    <td>{$vo.nickname}</td>
     <td>
     <volist name="vo['scope']" id="svo">
     <a href="?siteid={$svo.id}" target="_blank">{$svo.title}</a><br>
     </volist>
     
     </td>
    
    <if condition="getAccessMenu($accessList, 'Admin', 'Supplier', 'index')">
     <td>
     <volist name="vo['supplier']" id="svo">
     <a target="_blank" href="{:U('Supplier/edit', array('siteid' => $svo['site_id'],'id' => $svo['id']))}">{$svo.susername}</a><br>
     </volist>
     
     </td>
    </if>
    <td><form action="{:U('changePwd')}" method="post">
    <input type="password" name="password" /><input type="hidden" name="id" value="{$vo.id}" /><input type="submit" value="修改" />
    </form></td> 
    <td><eq name="vo['status']" value="1">启用<else/>禁用</eq></td>
    <td>{:date('Y-m-d H:i:s',$vo['last_login_time'])}</td>
    <td align="center">{$vo.last_login_ip}</td>

    <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
    <td align="center"><a href="{:U('edit',array('id'=>$vo['id']))}">编辑</a> | <a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');">删除</a></td>
  </tr>
</volist></table>
  <div class="pages">
        <div class="controlList fl"><a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a>
        
       </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
    </div>
  </div>
  <div class="clear"></div>
</div>
<include file="Public:footer" />